c# format json

93

object to json c# -

using Newtonsoft.Json;

var jsonString = JsonConvert.SerializeObject(obj);

c# format json -

using Newtonsoft.Json;

private static string FormatPrettyJson(object myobject)
{
    string json = JsonConvert.SerializeObject(object, Formatting.Indented);

    return json;
}

Comments

Submit
0 Comments